Optimal. Leaf size=34 \[ -\frac {2 \cos (c+d x)}{d \left (a^2 \sin (c+d x)+a^2\right )}-\frac {x}{a^2} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.04, antiderivative size = 34, normalized size of antiderivative = 1.00, number of steps used = 2, number of rules used = 2, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.095, Rules used = {2680, 8} \[ -\frac {2 \cos (c+d x)}{d \left (a^2 \sin (c+d x)+a^2\right )}-\frac {x}{a^2} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 8
Rule 2680
Rubi steps
\begin {align*} \int \frac {\cos ^2(c+d x)}{(a+a \sin (c+d x))^2} \, dx &=-\frac {2 \cos (c+d x)}{d \left (a^2+a^2 \sin (c+d x)\right )}-\frac {\int 1 \, dx}{a^2}\\ &=-\frac {x}{a^2}-\frac {2 \cos (c+d x)}{d \left (a^2+a^2 \sin (c+d x)\right )}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] time = 0.18, size = 104, normalized size = 3.06 \[ \frac {2 \left (\sin ^{-1}\left (\frac {\sqrt {1-\sin (c+d x)}}{\sqrt {2}}\right ) \sqrt {1-\sin (c+d x)} (\sin (c+d x)+1)+\sqrt {\sin (c+d x)+1} (\sin (c+d x)-1)\right ) \cos ^3(c+d x)}{a^2 d (\sin (c+d x)-1)^2 (\sin (c+d x)+1)^{5/2}} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
fricas [A] time = 0.86, size = 61, normalized size = 1.79 \[ -\frac {d x + {\left (d x + 2\right )} \cos \left (d x + c\right ) + {\left (d x - 2\right )} \sin \left (d x + c\right ) + 2}{a^{2} d \cos \left (d x + c\right ) + a^{2} d \sin \left (d x + c\right ) + a^{2} d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [A] time = 0.49, size = 33, normalized size = 0.97 \[ -\frac {\frac {d x + c}{a^{2}} + \frac {4}{a^{2} {\left (\tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) + 1\right )}}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [A] time = 0.20, size = 41, normalized size = 1.21 \[ -\frac {2 \arctan \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )\right )}{a^{2} d}-\frac {4}{a^{2} d \left (\tan \left (\frac {d x}{2}+\frac {c}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [A] time = 0.76, size = 56, normalized size = 1.65 \[ -\frac {2 \, {\left (\frac {2}{a^{2} + \frac {a^{2} \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}} + \frac {\arctan \left (\frac {\sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1}\right )}{a^{2}}\right )}}{d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [B] time = 4.64, size = 28, normalized size = 0.82 \[ -\frac {x}{a^2}-\frac {4}{a^2\,d\,\left (\mathrm {tan}\left (\frac {c}{2}+\frac {d\,x}{2}\right )+1\right )} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [A] time = 6.93, size = 95, normalized size = 2.79 \[ \begin {cases} - \frac {d x \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )}}{a^{2} d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a^{2} d} - \frac {d x}{a^{2} d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a^{2} d} - \frac {4}{a^{2} d \tan {\left (\frac {c}{2} + \frac {d x}{2} \right )} + a^{2} d} & \text {for}\: d \neq 0 \\\frac {x \cos ^{2}{\relax (c )}}{\left (a \sin {\relax (c )} + a\right )^{2}} & \text {otherwise} \end {cases} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________